<template>
  <div class="container">
    <header class="header">
      <img src="../assets/logo.png" alt="" @click="toHome">
      <span>
        <a @click="toNav">组件</a>
      </span>
    </header>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
    }
  },
  methods: {
    toNav () {
      this.$router.push('/nav')
    },
    toHome () {
      this.$router.push('/home')
    }
  }
}
</script>

<style scoped>
  .container{
    height: 100%;
    color: #41b883;
    text-align: center;
    box-sizing: border-box;
    width: 1000px;
    margin: 0 auto;
  }
  .header{
    width: 1000px;
    margin: 0 auto;
    height: 90px;
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.5);
    align-items: center;
  }
  .header img{
    height: 85px;
    width: 85px;
  }
  .header img:hover{
    cursor: pointer;
  }
  .header a{
    text-decoration: none;
    color: #41b883;
    font-size: 22px;
  }
  .header a:hover{
    color: #35495e;
    cursor: pointer;
  }
</style>
